<template>
  <div class="item">
   <component :is="type" :index="index"></component>
  </div>
</template>
<script>
const path = require('path')
const files = require.context('@/components/Item/components', false, /\.vue$/)
const modules = {}
files.keys().forEach(key => {
const name = path.basename(key, '.vue')
modules[name] = files(key).default || files(key)
})

export default {
  props: ['type', 'index'],
  data () {
    return {
    }
  },
  computed: {
  },
  methods: {
  },
  mounted () {
  },
  watch: {
  },
  components: {
    ...modules
  }
}
</script>

<style scoped>
   .item {
      width:100%;
      height:100%;
      overflow:hidden
   }
</style>
